﻿//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------

using System;
using UnityEngine;

namespace Adventure
{
    [Serializable]
    public abstract class FigureData : EntityData
    {    
        public FigureData(int entityId, int typeId)
            : base(entityId, typeId)
        {
           
        }

        public int Level
        {
            get; set;
        }
        public int Attack
        {
            get; set;
        }

        public int Defense
        {
            get; set;
        }

        public int CurrentHP
        {
            get; set;
        }


        public int MaxHP
        {
            get; set;
        }


        public float HPRatio
        {
            get
            {
                return CurrentHP > 0 ? (float)CurrentHP / MaxHP : 0f;
            }
        }
    }
}
